<%= form_for [:admin, @spu], html: { class: "card" } do |f| %>
  <div class="card-body">
    <h3 class="card-title">审核商品</h3>
    <div class="row">
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">名字</label>
          <div class="form-control-plaintext"><%= @spu.name %></div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">所属店铺</label>
          <div class="form-control-plaintext"><%= @spu.shop.name %></div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">所属分类</label>
          <div class="form-control-plaintext"><%= @spu.shop_category.name %></div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">品牌</label>
          <div class="form-control-plaintext"><%= @spu.brand.presence ? @spu.brand.name : "无" %></div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">是否进行促销</label>
          <div class="form-control-plaintext"><%= @spu.promotion ? "是" : "否" %></div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">能否使用优惠券</label>
          <div class="form-control-plaintext"><%= @spu.can_use_coupon ? "是" : "否" %></div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">奖金百分比<small>（0-100）</small></label>
          <%= f.number_field :bonus, class: "form-control", min: 0, max: 100 %>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">销售价</label>
          <div class="form-control-plaintext"><%= @spu.low_sale_price %></div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">成本价</label>
          <div class="form-control-plaintext"><%= @spu.low_cost_price %></div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">促销价</label>
          <div class="form-control-plaintext"><%= @spu.low_promotion_price %></div>
        </div>
      </div>
      <div class="col-md-12">
        <div class="form-group">
          <label class="form-label">承诺服务</label>
          <div class="form-control-plaintext">
            <% @spu.service_items.each do |service_item| %>
              <span class="tag tag-blue">
                <%= service_item.name %>
              </span>
            <% end %>
          </div>
        </div>
      </div>
      <div class="col-md-12">
        <div class="form-group">
          <div class="form-label">处理结果</div>
          <div class="custom-controls-stacked">
            <label class="custom-control custom-radio custom-control-inline">
              <%= f.radio_button :state, "onsale", { class: "custom-control-input" } %>
              <span class="custom-control-label">通过</span>
            </label>
            <label class="custom-control custom-radio custom-control-inline">
              <%= f.radio_button :state, "disagree", { class: "custom-control-input" } %>
              <span class="custom-control-label">拒绝</span>
            </label>
          </div>
        </div>
      </div>
      <div class="col-md-12">
        <div class="form-group">
          <label class="form-label">处理原因</label>
          <%= f.text_field :reason, class: "form-control" %>
        </div>
      </div>
    </div>
  </div>
  <div class="card-footer text-right">
    <%= f.submit "保 存", class: "btn btn-primary" %>
  </div>
<% end %>